import React, { Component } from "react";
import styled from "styled-components";


// ts+react继承写法
export default class BTab extends Component<any, any> {
  constructor(props: any) {
    super(props);
    this.state = {
      content: "这里是tab测试页面",
    };
  }
  render() {
    const Title = styled.div`
      color: red;
      font-size: 20px;
    `;
    return (
      <>
        <Title>{this.state.content}</Title>
      </>
    );
  }
}

// ts+react函数式写法
// const Title = styled.div`
//     color:red;
//     font-size:20px;
// `
// const content = "这里是tab测试页面"
// const  Btab =()=>{
//  return (
//     <>
//     <Title>{content}</Title>
//     </>
//  )   
// }
// export default Btab;